#ifndef COMMONUI_GFX_INSETS_H_
#define COMMONUI_GFX_INSETS_H_
#pragma once

#include "../concise-ui.h"

namespace gfx {

class CONCISEUI_API Insets
{
public:
	Insets(void);
	Insets(int left, int top, int right, int bottom);
	Insets(const Insets& insets);
	~Insets(void);

	int Left() const { return left_; }
	int Right() const { return right_; }
	int Top() const { return top_; }
	int Bottom() const { return bottom_; }

	int Width() const { return left_ + right_; }
	int Height() const { return top_ + bottom_; }

	bool IsEmpty() const { return Width() == 0 && Height() == 0; }
	
	void SetInsets(int left, int top, int right, int bottom)
	{
		top_ = top;
		bottom_ = bottom;
		left_ = left;
		right_ = right;
	}

	Insets& operator= (const Insets& rhs);
	bool operator== (const Insets& rhs) const;
	bool operator!= (const Insets& rhs) const;

private:
	int left_;
	int top_;
	int right_;
	int bottom_;
};

} // namesapce gfx

#endif // COMMONUI_GFX_INSETS_H_